package cn.com.callback

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import cn.com.elite.EliteBean;
import cn.com.elite.Util;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.jdbc.core.JdbcTemplate;
import cn.com.kh.getProperty;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.parser.Feature;
import net.sf.json.JSONObject;
import java.time.Instant;
import java.util.stream.Collectors;
import org.apache.commons.lang.StringUtils;

public class dd implements ServiceBackInvoke {
    private static final Log log = LogFactory.getLog(dd.class);
    public String doCallBack(EliteBean eliteBean, HttpServletRequest request, HttpServletResponse response) {
        response.setCharacterEncoding("UTF-8");

		String throughLine = "fttt,yyy,uuu,uuu,ooo,ooo";
		//将字符串变成数组，然后利用stream流变成集合
		List<String> throughLines = Arrays.stream(throughLine.split(",")).collect(Collectors.toList());
		//利用stream流将集合去重
		List<String> throughLineList = throughLines.stream().distinct().collect(Collectors.toList());
		//然后再用Stringuitls.join将集合变成逗号分开的字符串
		String thoughLineTarget = StringUtils.join(throughLineList, ",");
        return thoughLineTarget;
    }
}
